<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="css/ajaxtabs.css" />

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/ajaxtabs.js"></script>
<script type="text/javascript">


function DisplayTime(){
	if (!document.all && !document.getElementById)
	return
	timeElement=document.getElementById? document.getElementById("curTime"): document.all.tick2
	var CurrentDate=new Date()
	var hours=CurrentDate.getHours()
	var minutes=CurrentDate.getMinutes()
	var seconds=CurrentDate.getSeconds()
	var DayNight="PM"
	if (hours<12) DayNight="AM";
	if (hours>12) hours=hours-12;
	if (hours==0) hours=12;
	if (minutes<=9) minutes="0"+minutes;
	if (seconds<=9) seconds="0"+seconds;
	var currentTime=hours+":"+minutes+":"+seconds+" "+DayNight;
	timeElement.innerHTML="<font style='font-family:verdana, arial,tahoma;font-size:12px;color:#FFFFFF; font-weight:bold;'>"+currentTime+"</b>"
	setTimeout("DisplayTime()",1000)
}
	window.onload=DisplayTime;
</script>
</head>
<body style="margin: 0px;">
<%String userId = (String)request.getSession().getAttribute("userid");%>
<%String empRole = (String)request.getSession().getAttribute("empRole");%>
<table width="100%"  bgcolor="#004080">
	<tr>
		<td>
		<font face="Verdana" color="white" style="font-size: 25px;font-weight: bolder;"> 
			Leave Management System
		</font>
		</td>
		<td align="right"><font face="Verdana" color="white"  size="5" style="font-size: 18px;"> 
			Welcome , <%=userId%>
		</font>
		</td>
	</tr>
	<tr>
		<td align="right" colspan="2"><font face="Verdana" size="5" color="white" style="font-size: 10px;"> 
			<span id=curTime></span> &nbsp;&nbsp;<a href="/LMS/LogoutServlet" style="color: white;">Logout</a>
		</font>
		</td>
	</tr>
</table>
<hr color="white">
<ul id="resulttabs" class="shadetabs">
	<li><a href="/LMS/LeaveApplyServlet?MODO=default&userid=<%=userId%>" rel ="#iframe">Apply Leave</a></li>
	<li><a href="/LMS/LeaveReportServlet?MODO=default" rel = "#iframe">Report</a></li>
	<%if("M".equals(empRole)){ %>
		<li><a href="/LMS/AdminServlet?MODO=default" rel = "#iframe">Admin</a></li>
	<%} %>
</ul>
<div id="resultContainer" style="border:1px solid gray; width:100%; margin-bottom: 1em; padding: 10px"></div>
<script type="text/javascript">
if(document.getElementById('resulttabs') != null){
	var results=new ddajaxtabs("resulttabs","resultContainer");
	results.setpersist(false);
	results.setselectedClassTarget("link"); //"link" or "linkparent"
	results.init();
}
</script>
</body>
</html>